﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using YFIN.Admin.NewsServiceRef;
using YFIN.Admin.ViewModels;

namespace YFIN.Admin.Admin
{
    public partial class NewsManage : UserControl
    {
        NewsManageVM _nmvm;
        public NewsManage()
        {
            InitializeComponent();
            _nmvm = new NewsManageVM();
            this.DataContext = _nmvm;
        }
        private void delete_Click(object sender, RoutedEventArgs e)
        {
            _nmvm.News = ((Button)sender).DataContext as ModelNews;
            _nmvm.Delete();
        }
    }
}
